import 'package:flutter/material.dart';
import 'SingleChildScrollViewRoute.dart';
import 'ListViewRoute.dart';
import 'GridViewRoute.dart';
import 'CustomScrollViewTestRoute.dart';
import 'ScrollControllerTestRoute.dart';

class ScrollWidgetsRoute extends StatefulWidget {
  @override
  _ScrollWidgetsRouteState createState() => new _ScrollWidgetsRouteState();
}

class _ScrollWidgetsRouteState extends State<ScrollWidgetsRoute> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: new AppBar(
        title: Text('滚动Widgets'),
      ),
      body: new Center(
        child: new Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            RaisedButton(
                child: Text('SingleChildScrollView'),
                onPressed: () {
                  Navigator.push(
                    context,
                    new MaterialPageRoute(
                      builder: (context) {
                        return new SingleChildScrollViewRoute();
                      },
                    ),
                  );
                }),
            RaisedButton(
              child: Text('ListViewTestRoute'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new ListViewRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              child: Text('GridViewTestRoute'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new GridViewRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              child: Text('CustomScrollViewTestRoute'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new CustomScrollViewTestRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              child: Text('ScrollControllerTestRoute'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new ScrollControllerTestRoute();
                    },
                  ),
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}
